Revision: tla--no-direct-column-slot-access--1.3.1--version-0
Archive: lord@emf.net--libawk-exp-2005
Creator: Thomas Lord <lord@emf.net>
Date: Sun Feb 13 10:19:44 PST 2005
Standard-date: 2005-02-13 18:19:44 GMT
New-patches: lord@emf.net--libawk-exp-2005/tla--no-direct-column-slot-access--1.3.1--version-0
Summary: log message
Keywords: 


  Step 2 of the `libawk' cleanup follows much the same pattern as step
  1 which is found in.

  /Archive:/ `lord@emf.net--libawk-exp-2005'
  /Version:/ `tla--no-direct-column-slot-access--1.3.1' 

  This time to hide the repesentation of relational table rows and
  columns from client code.

  The declarations:

  [[tty
    struct rel_field
    {
      t_uchar * _f;
    };

    typedef struct rel_field rel_field;
    typedef rel_field * rel_record;
    typedef rel_record * rel_table;
  ]]

  are replaced for now by 

  [[tty
    struct rel_field
    {
      t_uchar * _f;
    };

    typedef struct rel_field rel_field;

    struct rel_record
    {
      rel_field * _c;
    };
    typedef struct rel_record rel_record;

    struct rel_table
    {
      rel_record * _r;
    };
    typedef struct rel_table rel_table;

    #ifndef REL_STATIC_DEFNS
    #define REL_STATIC_DEFNS
    static const rel_field rel_field_nil = { 0 };
    static const rel_record rel_record_nil = { 0 };
    static const rel_table rel_table_nil = { 0 };
    #endif
  ]]

  That change breaks all `libawk' client code that attempts to use a
  `rel_table' or `rel_record' as a pointer or array, allowing that
  code to be quickly located and repaired by following compiler error
  messages.

  The funtions `rel_peek_record', `rel_set_record', and
  `rel_add_field' were added to replace some of the idioms
  that formerly used array subscripting on `rel_table' and
  `rel_record' values.

